<template>
  <el-config-provider :locale="locale">
    <router-view v-if="isRouterAlive"/>
  </el-config-provider>
</template>

<script>
  import zhCn from 'element-plus/es/locale/lang/zh-cn'
  export default {
    name: 'App',
    data() {
      return {
        isRouterAlive: true,
        locale: zhCn
      }
    },
    provide() {
      return {
        reload: this.reload,
      }
    },
    mounted() {
    },
    created() {
    },
    methods: {
      reload() {
        this.isRouterAlive = false
        this.$nextTick(function () {
          this.isRouterAlive = true
        })
      }
    }
  }
</script>

<style>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
</style>
